FROM debian:trixie
RUN apt update && apt install -y --no-install-recommends --no-install-suggests cmake gcc g++ unzip ninja-build pkg-config libspdlog-dev libfmt-dev nlohmann-json3-dev libmsgpack-cxx-dev libthrift-dev libstb-dev thrift-compiler cppzmq-dev && apt clean
COPY . /SuperMatrix
RUN cd SuperMatrix && mkdir build && cd build && cmake ../docker/ClientOnly/ -DDISABLE_TEST=On -G Ninja && ninja && ninja install

FROM busybox:glibc
COPY --from=0 /SuperMatrix/build/Client/ThriftClient /bin/ThriftClient
COPY --from=0 /usr/local/lib/ /lib/
COPY --from=0 /lib/x86_64-linux-gnu /lib/
CMD ["/bin/ThriftClient"]
